// pages/afflatus/afflatusPage/Find/components/card/index.js
const app = getApp()
const utils = require('./../../../../../../utils/util.js')

Component({
  /**
   * 组件的属性列表
   */
  properties: {
    card:{
      type:Array,
      value:[],
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    
  },

  /**
   * 组件的方法列表
   */
  methods: {
    gotoST(e){
      let id = e.currentTarget.dataset.id
      const newId = {
        specialTypeId: id.specialTypeId,
        id: id.id
      }
      const params = {
        soursePlatform:'wx',
        specialId: id.id,
        userId : wx.getStorageSync('openId') || ''
      }

      wx.navigateTo({
        url: `/pages/home/homePage/SpecialTopic/index?id=${JSON.stringify(newId)}`,
        success: () => {
          console.log(params)
          utils.$http(app.globalData.api.SetSpecialBrowseRecords, params, 'POST', true, 'JSON').then(res => {
            // 阅览量
          })
        }
      })
    },
  }
})
